package org.bugeden.netdisk.utils

import org.apache.commons.lang.StringUtils

/**
 * Created by IntelliJ IDEA.
 * User: inotseeyou
 * Date: 2010-11-14
 * Time: 0:12:31
 * To change this template use File | Settings | File Templates.
 */

object PathUtils{
  def parent(path: String): String = {
    val p = path.substring(0, path.lastIndexOf("/"))
    if(StringUtils.isEmpty(p)){
      "/"
    }else{
      p
    }
  }
}
